from http.server import HTTPServer
from http.server import SimpleHTTPRequestHandler

address=('',8000);
httpd=HTTPServer(address,SimpleHTTPRequestHandler);
print('服务器运行于',address,'按ctrl+c结束');
httpd.serve_forever();